package com.emagic.manage.modules.main.domain;

import com.emagic.manage.data.entities.response.RoomsResponse;
import com.emagic.manage.data.repository.Repository;
import com.emagic.manage.mvp.domain.UseCase;

import javax.inject.Inject;

import rx.Observable;

/**
 * Created by xiatian on 2017/11/1.
 */

public class GetRoomListUseCase extends UseCase<RoomsResponse> {

    private Repository mRepository;
    private String userid;

    public void setUserid(String userid) {
        this.userid = userid;
    }

    @Inject
    public GetRoomListUseCase(Repository repository) {
        this.mRepository = repository;
    }

    @Override
    protected Observable<RoomsResponse> buildObservable() {
        return mRepository.getallroom(userid);
    }
}
